/**
 * 
 */
package orion.jarvis.task;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


/**
 * @author Ted
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Actor {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent
	private String name;

	/*
	 * (non-Javadoc)
	 * 
	 * @see alfred.task.core.TaskActor#getId()
	 */
	public Long getId() {
		return id;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see alfred.task.core.TaskActor#getName()
	 */
	public String getName() {
		return name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see alfred.task.core.TaskActor#setId(java.lang.Integer)
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see alfred.task.core.TaskActor#setName(java.lang.String)
	 */
	public void setName(String name) {
		this.name = name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("[");
		if (id != null)
			sb.append("id = ").append(id).append(", ");
		if (name != null)
			sb.append("name = ").append(name);
		sb.append("]");
		return sb.toString();
	}

}
